package com.chinairi.mall.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 完成时间的比较工具类
 *
 * @author web
 */
public class DateComparedUtil {
    public static int dateCompared(Date date1, Date date2) {
        int compareTo = 0;
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            compareTo = date1.compareTo(date2);
            System.out.println(compareTo);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return compareTo;
    }
}
